﻿<div class="page_title"><?php echo $data['title']?></div>
<div id="list">
	<div id="table_title" class="clearfix">
		<div class="WIDTH50">状态</div>
		<div class="WIDTH50">类型</div>
		<div class="WIDTH90">院系</div>
		<div class="WIDTH120">课程名称</div>
		<div class="WIDTH80">教师姓名</div>
		<div class="WIDTH90">教师类型</div>
		<div class="WIDTH70">职称</div>
		<div class="WIDTH70">课酬</div>
		<div class="WIDTH100">流水号</div>
	</div>
		<?php
		$i = true;
		$action = $_GET['action'];
		$currentPage = $data['currentPage'];
		$pageNum = $data ['pageNum'];
		if (count ( $data ['courses'] ) > 0)
			foreach ( $data ['courses'] as $row ) :
				?>
		<?php $i =!$i;?>
		<div class="row <?php if($i) echo "highlight"; ?> clearfix">
		<div class="WIDTH50"><?php echo ($row->approval==0)?"<span style='color:red'>处理中</span>":"已处理"?></div>
		<div class="WIDTH50"><?php echo ($row->courseType==1)?"课程":"讲座";?></div>
		<div class="WIDTH90"><?php echo getInstitute($row->department); ?></div>
		<div class="WIDTH120"><?php echo $row->courseName; ?></div>
		<div class="WIDTH80"><?php echo $row->teacherName; ?></div>
		<div class="WIDTH90"><?php echo getTeacherType($row->teacherType); ?></div>
		<div class="WIDTH70"><?php echo getJobTitle($row->jobTitle); ?></div>
		<div class="WIDTH70"><?php echo $row->salary.$row->getSalaryFixAttr(); ?></div>
		<div class="WIDTH100"><?php echo $row->serial; ?></div>
	</div>
	<div class="operator clearfix">
		<div class="ajaxbtn button"
			name="course_viewspecificcourse_id_<?php echo $row->id; ?>">查看</div>
				<?php if ((isSenate () || isAdmin ()) && $row->approval == 0) : ?>
		<div class="ajaxbtn button"
			name="course_approvecourse_id_<?php echo $row->id; ?>">批准</div>
				<?php endif;?>
				<?php if(isAdmin()||isInstitue()&& $row->approval==0):?>
			<div class="button ajaxbtn"
			name="course_editspecificcourse_id_<?php echo $row->id;?>">修改</div>
			<?php endif;?>
				<?php if(isInstitue()||isAdmin()):?>
		<div name="course_delete_id_<?php echo $row->id; ?>"
			class="ajaxbtn button">删除</div>
				<?php endif;?>
	</div>
	<?php endforeach;?>
	<div id="pages_bar">
		<?php if($currentPage>1):?>
		<div id="lastpage"
			name="course_<?php echo $action."_page_".($currentPage-1);?>"
			class="ajaxbtn">上一页</div>
		<?php endif;?>
		<?php if($pageNum>1):?>
		<?php for($i=1;$i<=$pageNum;$i++):?>
		<div name="course_<?php echo $action."_page_".$i;?>"
			class="page_item <?php echo ($currentPage==$i)?"selected":"ajaxbtn";?>"><?php echo $i;?></div>
		<?php endfor;?>
		<?php endif;?>
		<?php if($currentPage<$pageNum):?>
		<div id="nextpage"
			name="course_<?php echo $action."_page_".($currentPage+1);?>"
			class="ajaxbtn">下一页</div>
		<?php endif?>
	</div>

</div>